package com.fawvwebanma.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.fawvwebanma.dao.OrderListDao;
import com.fawvwebanma.dto.Result;
import com.fawvwebanma.entity.OrderList;
import com.fawvwebanma.entity.User;
import com.fawvwebanma.service.IOrderListService;

import lombok.extern.slf4j.Slf4j;

/**
 * @author jieye.ren
 * @date 2021/3/12
 */
@Component
@DubboService
@Slf4j
public class OrderListService implements IOrderListService {
    @Autowired
    OrderListDao orderListDao;

    @Override
    public Result<List<OrderList>> getOrderlistNoPay(User user) {
        Map<String, Object> map = new HashMap<>();
        map.put("user_id", user.getUserId());
        map.put("order_status", 0);
        List<OrderList> orderLists = orderListDao.getOrderlistNoPay(map);
        return Result.success(orderLists);
    }
}
